package com.ww.orm.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * @author sunnannan
 * @version 1.0
 * @date 2020/11/23 11:47 上午
 */
@Entity
@Table(name = "act_hi_procinst", schema = "aceace", catalog = "")
public class ActHiProcinstEntity {
    private String id;
    private String procInstId;
    private String businessKey;
    private String procDefId;
    private Timestamp startTime;
    private Timestamp endTime;
    private Long duration;
    private String startUserId;
    private String startActId;
    private String endActId;
    private String superProcessInstanceId;
    private String deleteReason;
    private String tenantId;
    private String name;

    @Id
    @Column(name = "ID_")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "PROC_INST_ID_")
    public String getProcInstId() {
        return procInstId;
    }

    public void setProcInstId(String procInstId) {
        this.procInstId = procInstId;
    }

    @Basic
    @Column(name = "BUSINESS_KEY_")
    public String getBusinessKey() {
        return businessKey;
    }

    public void setBusinessKey(String businessKey) {
        this.businessKey = businessKey;
    }

    @Basic
    @Column(name = "PROC_DEF_ID_")
    public String getProcDefId() {
        return procDefId;
    }

    public void setProcDefId(String procDefId) {
        this.procDefId = procDefId;
    }

    @Basic
    @Column(name = "START_TIME_")
    public Timestamp getStartTime() {
        return startTime;
    }

    public void setStartTime(Timestamp startTime) {
        this.startTime = startTime;
    }

    @Basic
    @Column(name = "END_TIME_")
    public Timestamp getEndTime() {
        return endTime;
    }

    public void setEndTime(Timestamp endTime) {
        this.endTime = endTime;
    }

    @Basic
    @Column(name = "DURATION_")
    public Long getDuration() {
        return duration;
    }

    public void setDuration(Long duration) {
        this.duration = duration;
    }

    @Basic
    @Column(name = "START_USER_ID_")
    public String getStartUserId() {
        return startUserId;
    }

    public void setStartUserId(String startUserId) {
        this.startUserId = startUserId;
    }

    @Basic
    @Column(name = "START_ACT_ID_")
    public String getStartActId() {
        return startActId;
    }

    public void setStartActId(String startActId) {
        this.startActId = startActId;
    }

    @Basic
    @Column(name = "END_ACT_ID_")
    public String getEndActId() {
        return endActId;
    }

    public void setEndActId(String endActId) {
        this.endActId = endActId;
    }

    @Basic
    @Column(name = "SUPER_PROCESS_INSTANCE_ID_")
    public String getSuperProcessInstanceId() {
        return superProcessInstanceId;
    }

    public void setSuperProcessInstanceId(String superProcessInstanceId) {
        this.superProcessInstanceId = superProcessInstanceId;
    }

    @Basic
    @Column(name = "DELETE_REASON_")
    public String getDeleteReason() {
        return deleteReason;
    }

    public void setDeleteReason(String deleteReason) {
        this.deleteReason = deleteReason;
    }

    @Basic
    @Column(name = "TENANT_ID_")
    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Basic
    @Column(name = "NAME_")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ActHiProcinstEntity that = (ActHiProcinstEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(procInstId, that.procInstId) &&
                Objects.equals(businessKey, that.businessKey) &&
                Objects.equals(procDefId, that.procDefId) &&
                Objects.equals(startTime, that.startTime) &&
                Objects.equals(endTime, that.endTime) &&
                Objects.equals(duration, that.duration) &&
                Objects.equals(startUserId, that.startUserId) &&
                Objects.equals(startActId, that.startActId) &&
                Objects.equals(endActId, that.endActId) &&
                Objects.equals(superProcessInstanceId, that.superProcessInstanceId) &&
                Objects.equals(deleteReason, that.deleteReason) &&
                Objects.equals(tenantId, that.tenantId) &&
                Objects.equals(name, that.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, procInstId, businessKey, procDefId, startTime, endTime, duration, startUserId, startActId, endActId, superProcessInstanceId, deleteReason, tenantId, name);
    }
}
